package com.base.service.workflow.service;

import com.base.core.framework.sql.service.SqlBaseService;
import com.base.service.workflow.entity.FlowDO;
import com.base.service.workflow.entity.TaskDO;
import com.gitee.magic.core.json.JsonObject;

/**
 * @author start 
 */
public interface FlowService extends SqlBaseService<FlowDO,Long> {

	/**
	 * 获取下一个流转
	 * @param processId
	 * @param parentFlowId
	 * @param task
	 * @param variables
	 * @return
	 */
	FlowDO nextFlow(Long processId,Long parentFlowId,TaskDO task, JsonObject variables);
	
	/**
	 * 流转完成
	 * @param flowId
	 */
	void setFinished(Long flowId);
	
	/**
	 * 获取当前流转对象
	 * @param processId
	 * @return null表示当前流程节点已全部执行完成
	 */
	FlowDO getCurrentActiveFlow(Long processId);
	
}
